<?php

/**
 * resources/templates/www/auto_index.phtml
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 *
 * PHP version 5
 *
 * @author    Johann Zelger <jz@appserver.io>
 * @copyright 2015 TechDivision GmbH <info@appserver.io>
 * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
 * @link      https://github.com/appserver-io/appserver
 * @link      http://www.appserver.io
 */
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Index of <?php echo $this->getUri() ?> | appserver.io</title>
<meta name="description" content="Index of <?php echo $this->getUri() ?>">
<style type="text/css">
<!--
    html, body { margin: 0; padding: 0; font-family: Arial, Helvetica, sans-serif; text-align: center; color: #222222;}
    header { background-color: #222; padding: 40px 0 20px 0; color: #FFF; }
    footer { font-size: 12px; border-top: 1px solid #eee; padding-top: 25px; margin-top: 25px; width: 90%; margin: 0 auto; text-align: right; }
    address { font-family: monospace, serif; font-style: normal; }
    h1 { margin: 0; font-size: 24px; padding: 10px 0 18px 0; font-weight: normal; }
    a, a:visited, a:focus, a:active { color: #222; text-decoration: none; }
    a:hover, a:visited:hover { color: #888; }
    .icon { background: url() no-repeat top left; background-position: -1924px 0; width: 16px; height: 16px; display: inline-block;}
    .icon.7z { background-position: 0 0; } .icon.ai { background-position: -26px 0; }.icon.aiff { background-position: -52px 0; } .icon.asc { background-position: -78px 0; } .icon.audio { background-position: -104px 0; } .icon.bin { background-position: -130px 0; } .icon.bz2 { background-position: -156px 0; } .icon.c { background-position: -182px 0; } .icon.cfc { background-position: -208px 0; } .icon.cfm { background-position: -234px 0; } .icon.chm { background-position: -260px 0; } .icon.class { background-position: -286px 0; } .icon.conf { background-position: -312px 0; } .icon.cpp { background-position: -338px 0; } .icon.cs { background-position: -364px 0; } .icon.css { background-position: -390px 0; } .icon.csv { background-position: -416px 0; } .icon.deb { background-position: -442px 0; } .icon.divx { background-position: -468px 0; } .icon.doc { background-position: -494px 0; } .icon.dot { background-position: -520px 0; } .icon.eml { background-position: -546px 0; } .icon.enc { background-position: -572px 0; } .icon.file { background-position: -598px 0; } .icon.gif { background-position: -624px 0; } .icon.gz { background-position: -650px 0; } .icon.hlp { background-position: -676px 0; } .icon.htm { background-position: -702px 0; } .icon.html { background-position: -728px 0; } .icon.image { background-position: -754px 0; } .icon.iso { background-position: -780px 0; } .icon.jar { background-position: -806px 0; } .icon.java { background-position: -832px 0; } .icon.jpeg { background-position: -858px 0; } .icon.jpg { background-position: -884px 0; } .icon.js { background-position: -910px 0; } .icon.lua { background-position: -936px 0; } .icon.m { background-position: -962px 0; } .icon.mm { background-position: -988px 0; } .icon.mov { background-position: -1014px 0; } .icon.mp3 { background-position: -1040px 0; } .icon.mpg { background-position: -1066px 0; } .icon.odc { background-position: -1092px 0; } .icon.odf { background-position: -1118px 0; } .icon.odg { background-position: -1144px 0; } .icon.odi { background-position: -1170px 0; } .icon.odp { background-position: -1196px 0; } .icon.ods { background-position: -1222px 0; } .icon.odt { background-position: -1248px 0; } .icon.ogg { background-position: -1274px 0; } .icon.pdf { background-position: -1300px 0; } .icon.pgp { background-position: -1326px 0; } .icon.php { background-position: -1352px 0; } .icon.pl { background-position: -1378px 0; } .icon.png { background-position: -1404px 0; } .icon.ppt { background-position: -1430px 0; } .icon.ps { background-position: -1456px 0; } .icon.py { background-position: -1482px 0; } .icon.ram { background-position: -1508px 0; } .icon.rar { background-position: -1534px 0; } .icon.rb { background-position: -1560px 0; } .icon.rm { background-position: -1586px 0; } .icon.rpm { background-position: -1612px 0; } .icon.rtf { background-position: -1638px 0; } .icon.sig { background-position: -1664px 0; } .icon.sql { background-position: -1690px 0; } .icon.swf { background-position: -1716px 0; } .icon.sxc { background-position: -1742px 0; } .icon.sxd { background-position: -1768px 0; } .icon.sxi { background-position: -1794px 0; } .icon.sxw { background-position: -1820px 0; } .icon.tar { background-position: -1846px 0; } .icon.tex { background-position: -1872px 0; } .icon.tgz { background-position: -1898px 0; } .icon.txt { background-position: -1924px 0; } .icon.vcf { background-position: -1950px 0; } .icon.video { background-position: -1976px 0; } .icon.vsd { background-position: -2002px 0; } .icon.wav { background-position: -2028px 0; } .icon.wma { background-position: -2054px 0; } .icon.wmv { background-position: -2080px 0; } .icon.xls { background-position: -2106px 0; } .icon.xml { background-position: -2132px 0; } .icon.xpi { background-position: -2158px 0; } .icon.xvid { background-position: -2184px 0; } .icon.zip { background-position: -2210px 0; }.icon.parentdir { background-position: -2236px 0; } .icon.dir { background-position: -2262px 0; }
    .explorer { font-family: monospace, serif; width: 90%; margin: 0 auto; padding: 30px 0; text-align: left; font-size: 14px; }
    tbody tr:nth-child(odd) {background: #FFF}
    tbody tr:nth-child(even) {background: #FAFAFA}
-->
</style>
</head>
<body>
    <header>
        <img title="appserver.io" src="">
        <h1>Index of <?php echo $this->getUri() ?></h1>
    </header>
    
    <table class="explorer">
        <thead>
            <tr>
                <th>Name</th>
                <th>Last Modified</th>
                <th>Size</th>
            </tr>
        </thead>
        <tbody>
            <?php if ($this->hasParent($realPath)): ?>
            <tr>
                <td colspan="3"><a href="<?php echo $this->getParentLink($realPath) ?>"><span class='icon parentdir'></span> Parent Directory</a></td>
            </tr>
            <?php endif; ?>
            <?php foreach ($this->getDirectoryContent($realPath) as $directory): ?>
            <tr>
                <td><a href="<?php echo $this->getLink($directory)?>"><span class='icon <?php echo $this->getIcon($directory) ?>'></span> <?php echo $this->getName($directory) ?></a></td>
                <td><?php echo $this->getDate($directory) ?></td>
                <td><?php echo $this->getFilesize($directory) ?></td>
            </tr>
            <?php endforeach; ?>
        </tbody>
    </table>
    
    <footer>
        <?php echo $this->getRequestContext()->getServerVar('SERVER_SIGNATURE') ?>
    </footer>
</body>
</html>